<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>店员管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			addParentPageNo();
		});
		
		function addParentPageNo() {
			var id = '${employee.id}';
			var pageNo = 1;
			if(id != "" && sessionStorage.parentPageNo) {
				pageNo = sessionStorage.parentPageNo;
			}
			var href = "${ctx}/employee/employee/?pageNo=" +pageNo + "&currentSelectId=" +id;
			$("#return").attr("href", href);
		}
	</script>
</head>
<body>
	<tags:breadcrumb name="breadcrumb" />
	<form:form id="inputForm" modelAttribute="employee" action="${ctx}/employee/employee/save" method="post" class="form-horizontal" >
		<form:hidden path="id"/>
		<form:hidden path="store.id" value="${fns:getStore().id}"/>
		<div class="icon-buttons">
			<a id="return"  data-role="button" data-inline="true" data-icon="back" data-iconpos="notext" href="">返回</a>
			<c:if test="${employee.status == 0}">
				<a data-role="button" data-inline="true" data-icon="edit" data-iconpos="notext" onclick="bossPasswordPopup('${ctx}/employee/employee/form?id=${employee.id}')">修改</a>
			</c:if>
		</div>
	    <table style="width: 100%;" data-role="table" class="ui-responsive table-stroke">
	    	<thead><tr><th>基本信息</th><th>照片</th></tr></thead>
	    	<tbody>
		    	<tr>
		    		<td>
						<div style="text-align: left; margin-left: 2em;">
							姓名&nbsp;&nbsp;:&nbsp;&nbsp;${employee.name}<br/><br/>
							性别&nbsp;&nbsp;:&nbsp;&nbsp;${fns:getDictLabel(employee.gender, 'gender', '')}<br/><br/>
							生日&nbsp;&nbsp;:&nbsp;&nbsp;${employee.birthday}<br/><br/>
							电话&nbsp;&nbsp;:&nbsp;&nbsp;${employee.mobile}<br/><br/>
							职位&nbsp;&nbsp;:&nbsp;&nbsp;${employee.storeRole.name}<br/><br/>
							工资&nbsp;&nbsp;:&nbsp;&nbsp;${employee.salary}&nbsp;元<br/><br/>
							身份证号&nbsp;&nbsp;:&nbsp;&nbsp;${employee.sfzh}<br/><br/>
							居住地址&nbsp;&nbsp;:&nbsp;&nbsp;${employee.jzdz}<br/><br/>
						</div>
		    		</td>
		    		<td>
					    <div>
							<img alt="员工照片" width="300" height="400" src="${ossPath}${employee.photo}">
					    </div>
		    		</td>
		    	</tr>
	    	</tbody>
	    </table>
	</form:form>
</body>
</html>
